
package Loader;

import java.util.LinkedList;

public class Loader {

    public BufferedData load(String fileName) {

        BufferedData result = null;
        LinkedList<Pair> data = null;

        String fileNameLowerCase = fileName.toLowerCase();

        if(fileNameLowerCase.contains("iris")) {

            data = (new LoaderIrys()).load(fileName);

        } else
            if(fileNameLowerCase.contains("wine")) {

                data = (new LoaderWine()).load(fileName);
                
            }

        result = new BufferedData(data);

        return result;
    }

}
